#include<iostream>

using namespace std;

int main()
{
    int a, b, c, d;
    cin >> a >> b >> c >> d;
    if (c >= b || d >= b) cout << c << "-Y" << " " << d << "-Y" << endl;
    else if ((c >= a && d < a)) cout << c << "-Y" << " " << d << "-N" << endl;
    else if ((d >= a && c < a))cout << c << "-N" << " " << d << "-Y" << endl;
    else cout << c << "-N" << " " << d << "-N" << endl;
    if (c >= a && d >= a) cout << "huan ying ru guan" << endl;
    else if (c < a && d >= b ) cout << "qing 2 zhao gu hao 1" << endl;
    else if (c >= b && d < a) cout << "qing 1 zhao gu hao 2" << endl;
    else if (a > c && d < a) cout << "zhang da zai lai ba" << endl;
    else if (a > c && (a <= d && d < b)) cout << "2: huan ying ru guan" << endl;
    else if (a > d && (a <= c && d < c)) cout << "1: huan ying ru guan" << endl;
    return 0;
}